package addEmployeeTransaction;

import schedule.BiWeeklySchedule;
import schedule.PaymentSchedule;
import classification.CommissionClassification;
import classification.PaymentClassification;
import database.PayrollDatabase;

public class AddCommissionedEmployee extends AddEmployeeTransaction {

	private double commissionRate;
	private double baseRate;

	public AddCommissionedEmployee(int id, String name, String address,
			double baseRate, double commissionRate, PayrollDatabase database) {
		super(id, name, address, database);

		this.baseRate = baseRate;
		this.commissionRate = commissionRate;
	}

	@Override
	protected PaymentClassification makeClassification() {
		return new CommissionClassification(baseRate, commissionRate);
	}

	@Override
	protected PaymentSchedule makeSchedule() {
		return new BiWeeklySchedule();
	}
}
